#ifndef _LFG_SYSTEM_H
#define _LFG_SYSTEM_H

enum LfgType
{
	LFG_TYPE_NONE		= 0x00,
	LFG_TYPE_DUNGEON	= 0x01,
	LFG_TYPE_RAID		= 0x02,
	LFG_TYPE_QUEST		= 0x03,
	LFG_TYPE_ZONE		= 0x04,
	LFG_TYPE_HEROIC		= 0x05,
	NUM_LFG_TYPES,
};

enum AutoLfgFlag
{
	AUTOFLAG_LOOKING_FOR_MORE		= 0x00,
	AUTOFLAG_LOOKING_FOR_GROUP		= 0x01,
};
struct PlayerLfgInfo
{
	PlayerLfgInfo(Player* pP = 0, ui8 quid = 0, ui32 que = 0) : pPlayer(pP), queueid(quid), questid(que)
	{
	}
	Player* pPlayer;
	ui8 queueid;
	// only for LFG_TYPE_QUEST:
	ui32 questid;
};

class DLL_EXPORT LfgSystem : public Single<LfgSystem>
{
	list<PlayerLfgInfo*>* m_queues[NUM_LFG_TYPES];
	ui32 DungeonTypes[245];
	struct DungeonType
	{
		ui32 id[24];
	};
public:
	LfgSystem();
	// Parameters:
	//     - id: for types TYPE_DUNGEON, TYPE_ZONE, TYPE_HEROIC, TYPE_RAID it specifies where
	//     - queueid: each player can wait in 3 queues simultaneously
	void QueuePlayer(Player* pPlayer, LfgType queuetype, ui32 id, ui32 queueid);
};

#define sLfgSystem (*LfgSystem::getSingle())

#endif